using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Drawing;
using System.Data;
using System.Text;
using System.Windows.Forms;
using Dundas;

namespace GaugePanel
{
    public partial class GaugeControl : UserControl
    {
        public GaugeControl()
        {
            InitializeComponent();
        }

        public void SetVoltageValue(Int16 aVoltage, Int16 bVoltage, Int16 cVoltage)
        {
            this.gaugeContainer_aVoltage.CircularGauges["Default"].Pointers["Default"].Value = aVoltage;
            this.gaugeContainer_aVoltage.NumericIndicators["NumericIndicator1"].Value = aVoltage;
            this.gaugeContainer_bVoltage.CircularGauges["Default"].Pointers["Default"].Value = bVoltage;
            this.gaugeContainer_bVoltage.NumericIndicators["NumericIndicator1"].Value = bVoltage;
            this.gaugeContainer_cVoltage.CircularGauges["Default"].Pointers["Default"].Value = cVoltage;
            this.gaugeContainer_cVoltage.NumericIndicators["NumericIndicator1"].Value = cVoltage;
        }

        public void SetCurrentValue(Int16[] Currents)
        {
            this.gaugeContainer_current1.CircularGauges["Default"].Pointers["Default"].Value = Currents[0];
            this.gaugeContainer_current1.NumericIndicators["NumericIndicator1"].Value = Currents[0];
            this.gaugeContainer_current1.StateIndicators["StateIndicator1"].Value = Currents[0];

            this.gaugeContainer_current2.CircularGauges["Default"].Pointers["Default"].Value = Currents[1];
            this.gaugeContainer_current2.NumericIndicators["NumericIndicator1"].Value = Currents[1];
            this.gaugeContainer_current2.StateIndicators["StateIndicator1"].Value = Currents[1];

            this.gaugeContainer_current3.CircularGauges["Default"].Pointers["Default"].Value = Currents[2];
            this.gaugeContainer_current3.NumericIndicators["NumericIndicator1"].Value = Currents[2];
            this.gaugeContainer_current3.StateIndicators["StateIndicator1"].Value = Currents[2];

            this.gaugeContainer_current4.CircularGauges["Default"].Pointers["Default"].Value = Currents[3];
            this.gaugeContainer_current4.NumericIndicators["NumericIndicator1"].Value = Currents[3];
            this.gaugeContainer_current4.StateIndicators["StateIndicator1"].Value = Currents[3];

            this.gaugeContainer_current5.CircularGauges["Default"].Pointers["Default"].Value = Currents[4];
            this.gaugeContainer_current5.NumericIndicators["NumericIndicator1"].Value = Currents[4];
            this.gaugeContainer_current5.StateIndicators["StateIndicator1"].Value = Currents[4];

            this.gaugeContainer_current6.CircularGauges["Default"].Pointers["Default"].Value = Currents[5];
            this.gaugeContainer_current6.NumericIndicators["NumericIndicator1"].Value = Currents[5];
            this.gaugeContainer_current6.StateIndicators["StateIndicator1"].Value = Currents[5];

            this.gaugeContainer_current7.CircularGauges["Default"].Pointers["Default"].Value = Currents[6];
            this.gaugeContainer_current7.NumericIndicators["NumericIndicator1"].Value = Currents[6];
            this.gaugeContainer_current7.StateIndicators["StateIndicator1"].Value = Currents[6];

            this.gaugeContainer_current8.CircularGauges["Default"].Pointers["Default"].Value = Currents[7];
            this.gaugeContainer_current8.NumericIndicators["NumericIndicator1"].Value = Currents[7];
            this.gaugeContainer_current8.StateIndicators["StateIndicator1"].Value = Currents[7];

            this.gaugeContainer_current9.CircularGauges["Default"].Pointers["Default"].Value = Currents[8];
            this.gaugeContainer_current9.NumericIndicators["NumericIndicator1"].Value = Currents[8];
            this.gaugeContainer_current9.StateIndicators["StateIndicator1"].Value = Currents[8];

            this.gaugeContainer_current10.CircularGauges["Default"].Pointers["Default"].Value = Currents[9];
            this.gaugeContainer_current10.NumericIndicators["NumericIndicator1"].Value = Currents[9];
            this.gaugeContainer_current10.StateIndicators["StateIndicator1"].Value = Currents[9];

            this.gaugeContainer_current11.CircularGauges["Default"].Pointers["Default"].Value = Currents[10];
            this.gaugeContainer_current11.NumericIndicators["NumericIndicator1"].Value = Currents[10];
            this.gaugeContainer_current11.StateIndicators["StateIndicator1"].Value = Currents[10];

            this.gaugeContainer_current12.CircularGauges["Default"].Pointers["Default"].Value = Currents[11];
            this.gaugeContainer_current12.NumericIndicators["NumericIndicator1"].Value = Currents[11];
            this.gaugeContainer_current12.StateIndicators["StateIndicator1"].Value = Currents[11];
        }
    }
}